package com.chenyaowei.happyhub.mapper;

import com.chenyaowei.happyhub.pojo.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface AdminMapper {
    Admin selectAdminByUsername(@Param("username") String username);
    List<Admin> selectAdminListByUsername(@Param("username") String username);
    List<Admin> selectAllAdmin();
    void insertAdmin(Admin admin);
    void deleteAdmin(@Param("adminId")String adminId);
    void updateAdmin(@Param("adminId")String adminId,@Param("username")String username,@Param("password")String password,@Param("email")String email,@Param("role")String role);
    void insertAdmin(@Param("username")String username,@Param("password")String password,@Param("email")String email,@Param("role")String role);
    void updateAdminPassword(@Param("password") String password,@Param("username") String username,@Param("email")String email,@Param("role")String role);
}
